package com.jiechuang.common.web;

public enum Code {
    SUCCESS(200, "success"),
    /** 保存成功 */
    SAVE_SUCCESS(200, "保存成功"),
    /** 保存失败 */
    SAVE_ERROR(500, "保存失败"),
    /** 修改成功 */
    UPDATE_SUCCESS(200, "修改成功"),
    /** 修改失败 */
    UPDATE_ERROR(500, "修改失败"),
    /** 删除成功*/
    DELETE_SUCCESS(200, "删除成功"),
    /** 删除失败*/
    DELETE_ERROR(500, "删除失败"),
    LOGIN_SUCCESS(200, "登陆成功"),
    LOGIN_ERROR(401, "登陆失败"),
    PARAMETER_ERROR(403,"参数错误"),
    SEARCH_ERROR(500,"查询失败"),
    USERNOTEXIST_ERROR(500,"用户不存在"),
    USERNAMEORPASSWORD_ERROR(500,"账号或密码错误");
    private final int code;
    private final String msg;

    Code(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
